#!/usr/bin/python3

import os
import re
import sys

fn = os.listdir(str(sys.argv[1]))
month = {'Jan':'01', 'Feb':'02', 'Mar':'03','Apr':'04', 'May':'05', 'Jun':'06', 'Jul':'07', 'Aug':'08', 'Sep':'09','Oct':'10','Nov':'11','Dec':'12'}
fn_re = re.compile(r'(a.*-)([0-9]{2})([A-Z][a-z]{2})(2[0-9]{3})')

for i in fn:
    n = fn_re.search(i)
    new_name = n.group(1)+n.group(4)+month[n.group(3)]+n.group(2)
print(new_name)
